package com.yilin.tms.core.entity.data.bill;

import com.baomidou.mybatisplus.annotation.EnumValue;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yilin.tms.core.commons.base.BaseDataEntity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;

/**
 * 车主代开票据资料
 * */
@Entity
@Table(name = "data_trucker_bill")
@TableName("data_trucker_bill")
public class TruckerBill extends BaseDataEntity {

    public enum BillStatus{
        create(0,"已创建"),deal(1,"处理中"),complete(2,"已完成"),scrap(3,"作废");
        @EnumValue
        public Integer index;
        public String name;
        BillStatus(Integer index, String name) {
            this.index = index;
            this.name = name;
        }
    }

    @Column(name = "organize_id")
    private String organizeId;
    @Column(name = "organize_name")
    private String organizeName;

    @Column(name = "organize_admin_id")
    private String organizeAdminId;
    @Column(name = "organize_admin_name")
    private String organizeAdminName;

    @Column(name = "id_card_no")
    private String idCardNo;//身份证号码
    @Column(name = "waybill_count")
    private Integer waybillCount;//开票运单数量
    @Column(name = "total_invoiced_amount")
    private Double totalInvoicedAmount;//总开票金额

    @Column(name = "involved_order_ids",columnDefinition = "TEXT")
    private String involvedOrderIds;//涉及运单Ids,（主要，下面的数据均由此出具）
    @Column(name = "involved_settlement_ids",columnDefinition = "TEXT")
    private String involvedSettlementIds;//涉及结算单Ids
    @Column(name = "involved_transport_nos",columnDefinition = "TEXT")
    private String involvedTransportNos;//涉及运单号,逗号隔开

    @Column(name = "involved_driver_ids",columnDefinition = "TEXT")
    private String involvedDriverIds;//涉及驾驶员Id,逗号隔开（用户打印驾驶员资料）
    @Column(name = "involved_vehicle_ids",columnDefinition = "TEXT")
    private String involvedVehicleIds;//涉及车辆ID,逗号隔开（用户打印车辆资料）
    @Column(name = "involved_note_ids",columnDefinition = "TEXT")
    private String involvedNoteIds;//涉及节点ID,逗号隔开（用户打印回执单资料）

    @Column(name = "involved_vehicle_infos",columnDefinition = "TEXT")
    private String involvedVehicleInfos;//涉及车辆（车牌号-车型-驾驶员）,逗号隔开
    @Column(name = "involved_areas",columnDefinition = "TEXT")
    private String involvedAreas;//涉及区域(A-B,A-C,A-D,G-F,G-X,...),逗号隔开
    @Column(name = "involved_goods_names",columnDefinition = "TEXT")
    private String involvedGoodsNames;//涉及货物类型-名称, 逗号隔开

    @Column(name = "initiate_user_id")
    private String initiateUserId;//票单数据发起人
    @Column(name = "initiate_user_name")
    private String initiateUserName;//票单数据发起人名称
    @Column(name = "deal_user_id")
    private String dealUserId;//票单数据处理人
    @Column(name = "deal_user_name")
    private String dealUserName;//票单数据处理人名称
    @Column(name = "deal_time",updatable = false)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date dealTime;//票单数据处理时间

    @Column(name = "bill_download_count")
    private Integer billDownloadCount;//票单下载次数
    @Column(name = "bill_status")
    private BillStatus billStatus;//票据状态


    public String getInvolvedNoteIds() {
        return involvedNoteIds;
    }

    public void setInvolvedNoteIds(String involvedNoteIds) {
        this.involvedNoteIds = involvedNoteIds;
    }

    public String getInvolvedVehicleIds() {
        return involvedVehicleIds;
    }

    public void setInvolvedVehicleIds(String involvedVehicleIds) {
        this.involvedVehicleIds = involvedVehicleIds;
    }

    public String getOrganizeAdminId() {
        return organizeAdminId;
    }

    public void setOrganizeAdminId(String organizeAdminId) {
        this.organizeAdminId = organizeAdminId;
    }

    public Date getDealTime() {
        return dealTime;
    }

    public void setDealTime(Date dealTime) {
        this.dealTime = dealTime;
    }

    public String getOrganizeId() {
        return organizeId;
    }

    public void setOrganizeId(String organizeId) {
        this.organizeId = organizeId;
    }

    public String getOrganizeName() {
        return organizeName;
    }

    public void setOrganizeName(String organizeName) {
        this.organizeName = organizeName;
    }

    public String getOrganizeAdminName() {
        return organizeAdminName;
    }

    public void setOrganizeAdminName(String organizeAdminName) {
        this.organizeAdminName = organizeAdminName;
    }

    public String getIdCardNo() {
        return idCardNo;
    }

    public void setIdCardNo(String idCardNo) {
        this.idCardNo = idCardNo;
    }

    public Integer getWaybillCount() {
        return waybillCount;
    }

    public void setWaybillCount(Integer waybillCount) {
        this.waybillCount = waybillCount;
    }

    public Double getTotalInvoicedAmount() {
        return totalInvoicedAmount;
    }

    public void setTotalInvoicedAmount(Double totalInvoicedAmount) {
        this.totalInvoicedAmount = totalInvoicedAmount;
    }

    public String getInvolvedOrderIds() {
        return involvedOrderIds;
    }

    public void setInvolvedOrderIds(String involvedOrderIds) {
        this.involvedOrderIds = involvedOrderIds;
    }

    public String getInvolvedSettlementIds() {
        return involvedSettlementIds;
    }

    public void setInvolvedSettlementIds(String involvedSettlementIds) {
        this.involvedSettlementIds = involvedSettlementIds;
    }

    public String getInvolvedTransportNos() {
        return involvedTransportNos;
    }

    public void setInvolvedTransportNos(String involvedTransportNos) {
        this.involvedTransportNos = involvedTransportNos;
    }

    public String getInvolvedVehicleInfos() {
        return involvedVehicleInfos;
    }

    public void setInvolvedVehicleInfos(String involvedVehicleInfos) {
        this.involvedVehicleInfos = involvedVehicleInfos;
    }

    public String getInvolvedDriverIds() {
        return involvedDriverIds;
    }

    public void setInvolvedDriverIds(String involvedDriverIds) {
        this.involvedDriverIds = involvedDriverIds;
    }

    public String getInvolvedAreas() {
        return involvedAreas;
    }

    public void setInvolvedAreas(String involvedAreas) {
        this.involvedAreas = involvedAreas;
    }

    public String getInvolvedGoodsNames() {
        return involvedGoodsNames;
    }

    public void setInvolvedGoodsNames(String involvedGoodsNames) {
        this.involvedGoodsNames = involvedGoodsNames;
    }

    public String getInitiateUserId() {
        return initiateUserId;
    }

    public void setInitiateUserId(String initiateUserId) {
        this.initiateUserId = initiateUserId;
    }

    public String getInitiateUserName() {
        return initiateUserName;
    }

    public void setInitiateUserName(String initiateUserName) {
        this.initiateUserName = initiateUserName;
    }

    public String getDealUserId() {
        return dealUserId;
    }

    public void setDealUserId(String dealUserId) {
        this.dealUserId = dealUserId;
    }

    public String getDealUserName() {
        return dealUserName;
    }

    public void setDealUserName(String dealUserName) {
        this.dealUserName = dealUserName;
    }

    public Integer getBillDownloadCount() {
        return billDownloadCount;
    }

    public void setBillDownloadCount(Integer billDownloadCount) {
        this.billDownloadCount = billDownloadCount;
    }

    public BillStatus getBillStatus() {
        return billStatus;
    }

    public void setBillStatus(BillStatus billStatus) {
        this.billStatus = billStatus;
    }
}
